package com.sf.fy.uav.controller;

import com.sf.fy.uav.common.request.operate.FileAddRequest;
import com.sf.fy.uav.entity.File;
import com.sf.fy.uav.service.IFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 文件 前端控制器
 * </p>
 *
 * @author LTQ
 * @since 2023-07-03
 */
@RestController
@RequestMapping("/home/file")
public class FileRest {
    @Autowired
    private IFileService iFileService;

    @PostMapping("add")
    public File add(FileAddRequest fileAddRequest) {
        return iFileService.add(fileAddRequest);
    }
}
